package com.koocloud.electroplatemanage.mapper;
import com.koocloud.electroplatemanage.pojo.CodeNameResult;
import com.koocloud.electroplatemanage.pojo.TypeWorkVo;
import com.koocloud.electroplatemanage.pojo.WorkTimeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: electroplatemanage
 * @description: 工种Mapper接口
 * @author: zww
 * @create: 2020-09-29 15:55
 */
@Mapper
public interface TypeWorkMapper {
    //通过pk查询一条记录 delete_flag = "1"
    TypeWorkVo selectByPk(String pkTypeWork);
    //通过pk查询一条记录  delete_flag = "0"
    TypeWorkVo selectByCode(String typeworkCode);
    //查询所有记录
    List<TypeWorkVo> selectAllData(TypeWorkVo typeWorkVo);
    //根据状态进行模糊查询 启用为1 禁用为0
    List<TypeWorkVo> selectByDeleteFlag(TypeWorkVo typeWorkVo);
    //插入一条记录
    int insert(TypeWorkVo typeWorkVo);
    //批量插入记录
    int batchInsert(List<TypeWorkVo> listTypeWorkVo);
    //逻辑删除一条记录
    int delete(@Param("typeworkCode")String typeworkCode, @Param("deleteFlag") String deleteFlag);
    //通过pks批量逻辑删除记录
    int batchDeleteByPks(List listPks);
    //修改一条记录
    int update(TypeWorkVo typeWorkVo);
    //修改一条记录 delete_flag
    int updateFlag(TypeWorkVo typeWorkVo);
    //获取
    List<CodeNameResult> selectTypeWork(String idOrName);
    //通过工种名称查询一条记录
    TypeWorkVo selectByName(String name);
    //获取工种总数
    int selectAmount();
}
